#include "Rectangle.h"

Rectangle::Rectangle(){
    this->width = 1;
    this->height = 1;
}

Rectangle::Rectangle(double width, double height){
    setWidth(width);
    setHeight(height);
}

Rectangle::Rectangle(double width, double height, const string & color, bool filled){
    setWidth(width);
    setHeight(height);
    setColor(color);
    setFilled(filled);
}

double Rectangle::getWidth() const{
    return this->width;
}

double Rectangle::getHeight() const{
    return this->height;
}

void Rectangle::setWidth(double width){
    this->width  =  width;
}

void Rectangle::setHeight(double height){
    this->height = height;
}

double Rectangle::getArea() const{
    return width * height;
}

double Rectangle::getPerimeter() const{
    return 2*(width+height);
}

string Rectangle::toString() const{
    return "Rectangle Object";
}